package net.slidinglive.utilities.enumeration;

import net.slidinglive.utilities.R;
import android.content.Context;

/**
 * If the user chooses to backup contacts, the source is EXISTING. if the user chooses to restore contacts, the source
 * is BACKUP.
 * 
 * @author Sebastian Hoffmann <bo.hoffi@gmail.com>
 */
public enum ContactSource {

    EXISTING, BACKUP;

    /**
     * @return the caption
     */
    public String getCaption(final Context context) {

        String caption = "";

        switch (this) {
            case BACKUP:
                caption = context.getResources().getString(R.string.contacts_source_choice_backup);
                break;

            case EXISTING:
                caption = context.getResources().getString(R.string.contacts_source_choice_existing);
                break;

            default:
                caption = context.getResources().getString(R.string.contacts_source_choice_existing);
                break;
        }
        return caption;
    }
}